<?php

class Solution
{
    /**
     * @param String $s
     * @return Boolean
     */
    function repeatedSubstringPattern($s)
    {
        $strLen = strlen($s);

        for ($i = 1; $i <= $strLen / 2; $i++) {
            $subStr = substr($s, 0, $i);
            if (str_replace($subStr, '', $s) == '') {
                return true;
            }
        }
        return false;
    }
}
